package com.cheney.demo.webservice;


import com.cheney.demo.webservice.dto.RequestParamBodyDTO;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import java.util.Date;

@WebService(targetNamespace = "http://xxx")
public interface PortalService {

    @WebMethod(operationName = "RequestParamBody")
    @RequestWrapper(localName = "RequestParamBody", targetNamespace = "http://xxx",
            className = "com.cheney.demo.webservice.dto.RequestParamBodyDTO")
    @ResponseWrapper(localName = "buyInsuranceResponse", targetNamespace = "http://xxx",
            className = "com.cheney.demo.webservice.dto.ResponseParamBodyDTO")
    @WebResult(name = "strPolID", targetNamespace = "http://xxx")
    String buyInsurance(@WebParam RequestParamBodyDTO requestParamBody);

    @WebMethod(operationName = "GasApplyPolicyRequestParamBody")
    @ResponseWrapper(localName = "gasApplyPolicyResponse", targetNamespace = "http://xxx",
            className = "com.cheney.demo.webservice.dto.GasApplyPolicyResponseParamBodyDTO")
    @WebResult(name = "strAppID", targetNamespace = "http://xxx")
    String gasApplyPolicy(@WebParam(name = "strSerialNO") String strSerialNO,
                          @WebParam(name = "strChannelCDE") String strChannelCDE,
                          @WebParam(name = "strDptCDE") String strDptCDE,
                          @WebParam(name = "strDptNME") String strDptNME,
                          @WebParam(name = "strCardNO") String strCardNO,
                          @WebParam(name = "ninsureMoney") Long ninsureMoney,
                          @WebParam(name = "strInsrncCDE") String strInsrncCDE,
                          @WebParam(name = "strPlan") String strPlan,
                          @WebParam(name = "strUserName") String strUserName,
                          @WebParam(name = "strUserTel") String strUserTel,
                          @WebParam(name = "strIDType") String strIDType,
                          @WebParam(name = "strIDNo") String strIDNo,
                          @WebParam(name = "strInsuredName") String strInsuredName,
                          @WebParam(name = "strInsuredTel") String strInsuredTel,
                          @WebParam(name = "strInsuredIDType") String strInsuredIDType,
                          @WebParam(name = "strInsuredIDNo") String strInsuredIDNo,
                          @WebParam(name = "strGasUserAddress") String strGasUserAddress,
                          @WebParam(name = "strGasUserID") String strGasUserID,
                          @WebParam(name = "strApplyDate") Date strApplyDate,
                          @WebParam(name = "strBeginDate") Date strBeginDate,
                          @WebParam(name = "strEndDate") Date strEndDate,
                          @WebParam(name = "strAccountID") String strAccountID,
                          @WebParam(name = "strAccountPass") String strAccountPass
    );


    @WebMethod(operationName = "GasIssuePolicyRequestParamBody")
    @ResponseWrapper(localName = "gasIssuePolicyResponse", targetNamespace = "http://xxx",
            className = "com.cheney.demo.webservice.dto.GasIssuePolicyResponseParamBodyDTO")
    @WebResult(name = "strPolID", targetNamespace = "http://xxx")
    String gasIssuePolicy(@WebParam(name = "strAppID") String strAppID,
                          @WebParam(name = "strChannelCDE") String strChannelCDE,
                          @WebParam(name = "strDptCDE") String strDptCDE,
                          @WebParam(name = "strPayMode") String strPayMode,
                          @WebParam(name = "strPayDate") Date strPayDate,
                          @WebParam(name = "strBankPayNumber") String strBankPayNumber,
                          @WebParam(name = "strAccountID") String strAccountID,
                          @WebParam(name = "strAccountPass") String strAccountPass);
}
